<script src="js/spry/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="js/spry/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<table width="495" height="300" style="border-left: solid 1px #CCC;
	border-bottom: solid 1px #CCC;
	border-top: solid 1px #999;
	border-right: solid 1px #999;">
<tr>
<td valign="top">
<div id="TabbedPanels2" class="TabbedPanels">
  <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab2" tabindex="0" onclick="return tracking('For sale');">For sale</li>
    <li class="TabbedPanelsTab2" tabindex="0" onclick="return tracking('Jobs');">Jobs</li>
    <li class="TabbedPanelsTab2" tabindex="0" onclick="return tracking('Rent');">Rent</li>
    <li class="TabbedPanelsTab2" tabindex="0" onclick="return tracking('Real Estate');">Real Estate</li>
    <li class="TabbedPanelsTab2" tabindex="0" onclick="return tracking('Services');">Services</li>
    <li class="TabbedPanelsTab2" tabindex="0" onclick="return tracking('Dating');">Dating</li>
  </ul>
  <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent" style="line-height:23px">
    <?php
	//For sale
	echo "<table width='100%' border='0'>";
    echo "<tr>";
    echo "<td width=100 valign=top>";
require_once "includes/config.php";
$sqlCatForSale="Select category_id,category_name FROM tbl_category where parent_id=1 ORDER BY category_name ASC";
	$rstCatForSale=mysql_query($sqlCatForSale);				 
	$numCatForSale=mysql_num_rows($rstCatForSale);
	if($numCatForSale==0)
	{
		echo "No Categories Found...";
	}
	else{
	$i=1;
	$j=0;
	 while($rowCatForSale=mysql_fetch_array($rstCatForSale))
	 {
	 if($i!=0)
	 {
		echo "<a href='index.php?subCat=".$rowCatForSale["category_id"]."'>".$rowCatForSale["category_name"]."</a><br>";
		$j++;
		 if($j%10==0)
		  echo "</td ><td width=100 valign=top>";
		 if($j>=30)
		   $i=0;
	 }
	 else
	    echo "More Items";
	 }
	 }
	 echo "</td>";
   echo "</tr>";
 echo "</table>";
	?>
    </div>
    <div class="TabbedPanelsContent"  style="line-height:23px">
     <?php
	//For Jobs
	echo "<table width='100%' border='0'>";
    echo "<tr>";
    echo "<td width=100 valign=top>";
require_once "includes/config.php";
$sqlCatForSale="Select category_id,category_name FROM tbl_category where parent_id=2 ORDER BY category_name ASC";
	$rstCatForSale=mysql_query($sqlCatForSale);				 
	$numCatForSale=mysql_num_rows($rstCatForSale);
	if($numCatForSale==0)
	{
		echo "No Categories Found...";
	}
	else{
	$i=1;
	$j=0;
	 while($rowCatForSale=mysql_fetch_array($rstCatForSale))
	 {
	 if($i!=0)
	 {
		echo "<a href='index.php?subCat=".$rowCatForSale["category_id"]."'>".$rowCatForSale["category_name"]."</a><br>";
		$j++;
		 if($j%10==0)
		  echo "</td ><td width=100 valign=top>";
		 if($j>=30)
		   $i=0;
	 }
	 else
	    echo "More Items";
	 }
	 }
	 echo "</td>";
   echo "</tr>";
 echo "</table>";
	?></div>
    <div class="TabbedPanelsContent"  style="line-height:23px">
     <?php
	//For Rents
	echo "<table width='100%' border='0'>";
    echo "<tr>";
    echo "<td width=100 valign=top>";
require_once "includes/config.php";
$sqlCatForSale="Select category_id,category_name FROM tbl_category where parent_id=3 ORDER BY category_name ASC";
	$rstCatForSale=mysql_query($sqlCatForSale);				 
	$numCatForSale=mysql_num_rows($rstCatForSale);
	if($numCatForSale==0)
	{
		echo "No Categories Found...";
	}
	else{
	$i=1;
	$j=0;
	 while($rowCatForSale=mysql_fetch_array($rstCatForSale))
	 {
	 if($i!=0)
	 {
		echo "<a href='index.php?subCat=".$rowCatForSale["category_id"]."'>".$rowCatForSale["category_name"]."</a><br>";
		$j++;
		 if($j%10==0)
		  echo "</td ><td width=100 valign=top>";
		 if($j>=30)
		   $i=0;
	 }
	 else
	    echo "More Items";
	 }
	 }
	 echo "</td>";
   echo "</tr>";
 echo "</table>";
	?></div>
        <div class="TabbedPanelsContent"  style="line-height:23px">
     <?php
	//For Real State
	echo "<table width='100%' border='0'>";
    echo "<tr>";
    echo "<td width=100 valign=top>";
require_once "includes/config.php";
$sqlCatForSale="Select category_id,category_name FROM tbl_category where parent_id=4 ORDER BY category_name ASC";
	$rstCatForSale=mysql_query($sqlCatForSale);				 
	$numCatForSale=mysql_num_rows($rstCatForSale);
	if($numCatForSale==0)
	{
		echo "No Categories Found...";
	}
	else{
	$i=1;
	$j=0;
	 while($rowCatForSale=mysql_fetch_array($rstCatForSale))
	 {
	 if($i!=0)
	 {
		echo "<a href='index.php?subCat=".$rowCatForSale["category_id"]."'>".$rowCatForSale["category_name"]."</a><br>";
		$j++;
		 if($j%10==0)
		  echo "</td ><td width=100 valign=top>";
		 if($j>=30)
		   $i=0;
	 }
	 else
	    echo "More Items";
	 }
	 }
	 echo "</td>";
   echo "</tr>";
 echo "</table>";
	?></div>
        <div class="TabbedPanelsContent"  style="line-height:23px">
     <?php
	//For Services
	echo "<table width='100%' border='0'>";
    echo "<tr>";
    echo "<td width=100 valign=top>";
require_once "includes/config.php";
$sqlCatForSale="Select category_id,category_name FROM tbl_category where parent_id=5 ORDER BY category_name ASC";
	$rstCatForSale=mysql_query($sqlCatForSale);				 
	$numCatForSale=mysql_num_rows($rstCatForSale);
	if($numCatForSale==0)
	{
		echo "No Categories Found...";
	}
	else{
	$i=1;
	$j=0;
	 while($rowCatForSale=mysql_fetch_array($rstCatForSale))
	 {
	 if($i!=0)
	 {
		echo "<a href='index.php?subCat=".$rowCatForSale["category_id"]."'>".$rowCatForSale["category_name"]."</a><br>";
		$j++;
		 if($j%10==0)
		  echo "</td ><td width=100 valign=top>";
		 if($j>=30)
		   $i=0;
	 }
	 else
	    echo "More Items";
	 }
	 }
	 echo "</td>";
   echo "</tr>";
 echo "</table>";
	?></div>
    <div class="TabbedPanelsContent"  style="line-height:23px">
     <?php
	//For Services
	echo "<table width='100%' border='0'>";
    echo "<tr>";
    echo "<td width=100 valign=top>";
require_once "includes/config.php";
$sqlCatForSale="Select category_id,category_name FROM tbl_category where parent_id=5 ORDER BY category_name ASC";
	$rstCatForSale=mysql_query($sqlCatForSale);				 
	$numCatForSale=mysql_num_rows($rstCatForSale);
	if($numCatForSale==0)
	{
		echo "No Categories Found...";
	}
	else{
	$i=1;
	$j=0;
	 while($rowCatForSale=mysql_fetch_array($rstCatForSale))
	 {
	 if($i!=0)
	 {
		echo "<a href='index.php?subCat=".$rowCatForSale["category_id"]."'>".$rowCatForSale["category_name"]."</a><br>";
		$j++;
		 if($j%10==0)
		  echo "</td ><td width=100 valign=top>";
		 if($j>=30)
		   $i=0;
	 }
	 else
	    echo "More Items";
	 }
	 }
	 echo "</td>";
   echo "</tr>";
 echo "</table>";
	?></div>
  </div>
</div>

</td>
</tr>
</table>
<script type="text/javascript">
<!--
var TabbedPanels2 = new Spry.Widget.TabbedPanels(0,2,"TabbedPanels2");
//-->
</script>